/*
   @Copyright:LibreOJ
   @Author:   tjyemail
   @Problem:  https://loj.ac/problem/7
   @Language: C++
   @Datetime: 20-07-31 13:07
   */
// fread; time 142ms
#include <bits/stdc++.h>
using namespace std;

typedef unsigned long long _FR_TYPE;
char _FR_BUF[102400];
struct _FR {
	char *buf;
	size_t size, block, idx, end;
	_FR_TYPE num;
	_FR(char *_buf, size_t _size, size_t _block):buf(_buf), size(_size), block(_block){idx=end=size;}
	inline _FR_TYPE read() {
		if (idx > size - block && end == size) {
			memmove(buf, buf + idx, end - idx);
			end = size - idx + fread(buf + size - idx, 1, idx, stdin);
			idx = 0;
		}
		for (num=0; !isdigit(buf[idx]); ++idx);
		for (; isdigit(buf[idx]); ++idx)
			num = num * 10LL + buf[idx] - '0';
		return num;
	}
} fr(_FR_BUF, sizeof(_FR_BUF), 32);

int main() {
	_FR_TYPE ans = 0;
	for (int n = 3000000; n--; ans ^= fr.read());
	printf("%lld\n", ans);
	return 0;
}
